﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Threading;

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        UpdataMybookdata UP = new UpdataMybookdata();
        SQL sql = new SQL();
        DataSet ds = sql.getDataset("select bookname from book_info where imageurl is null","");
        DataTable dt = new DataTable();
        DataRow drow;
        DataRowCollection drc;
        dt = ds.Tables[0];
        drc = dt.Rows;
        for (int i = 0; i < drc.Count; i++)
        {
            Thread.Sleep(2000);
            drow = drc[i];
            try
            {
                UP.getinfoFromDouban(drow[0].ToString());
                Response.Write(drow[0].ToString());
            }
            catch (System.Exception ex)
            {
                continue;
            }
            finally
            {
                
            }
           
        }
       

    }
}